<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品上架</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
    <h1>商品上架</h1>

    <form class="product-form"  enctype="multipart/form-data" method="post" action="upload" >
        <div class="form-group">
            <label for="product-name">品名:</label>
            <input type="text" id="product-name" name="productName" placeholder="请输入商品名称" required>
        </div>

        <div class="form-group">
            <label>商品图片 (最多5张):</label>
            <div class="image-upload-area">
                <input type="file" id="product-images" name="uploadFiles" accept="image/*" multiple>
                <p class="help-text">点击或拖拽图片到此处上传</p>
                <div class="image-preview">
                    <div class="placeholder">暂无图片</div>
                </div>
            </div>
        </div>

        <div class="form-group inline-group">
            <div class="input-half">
                <label for="unit-price">单价 (¥):</label>
                <input type="number" id="unit-price" name="unitPrice" step="0.01" min="0" placeholder="0.00" required>
            </div>
            <div class="input-half">
                <label for="special-price">特价 (¥):</label>
                <input type="number" id="special-price" name="specialPrice" step="0.01" min="0" placeholder="0.00">
            </div>
        </div>

        <div class="form-group">
            <label for="description">描述:</label>
            <textarea id="description" name="description" rows="6" placeholder="请输入商品详细描述..." required></textarea>
        </div>

        <div class="form-group">
            <label for="stock-quantity">库存数量:</label>
            <input type="number" id="stock-quantity" name="stockQuantity" min="0" placeholder="0" required>
        </div>

        <div class="form-actions">
            <button type="submit" class="submit-btn">上架商品</button>
            <button type="reset" class="reset-btn">重置</button>
        </div>
    </form>
</div>
</body>
</html>
